package com.example.communitypro.pojo;

import java.io.Serializable;
import java.util.Date;

public class UserLikes implements Serializable {
    private Integer likeId;

    private Integer userNo;

    private Integer likeObjectNo;

    private Integer likeObjectType;

    private Date likeTime;

    private static final long serialVersionUID = 1L;

    public Integer getLikeId() {
        return likeId;
    }

    public void setLikeId(Integer likeId) {
        this.likeId = likeId;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public Integer getLikeObjectNo() {
        return likeObjectNo;
    }

    public void setLikeObjectNo(Integer likeObjectNo) {
        this.likeObjectNo = likeObjectNo;
    }

    public Integer getLikeObjectType() {
        return likeObjectType;
    }

    public void setLikeObjectType(Integer likeObjectType) {
        this.likeObjectType = likeObjectType;
    }

    public Date getLikeTime() {
        return likeTime;
    }

    public void setLikeTime(Date likeTime) {
        this.likeTime = likeTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserLikes other = (UserLikes) that;
        return (this.getLikeId() == null ? other.getLikeId() == null : this.getLikeId().equals(other.getLikeId()))
                && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
                && (this.getLikeObjectNo() == null ? other.getLikeObjectNo() == null : this.getLikeObjectNo().equals(other.getLikeObjectNo()))
                && (this.getLikeObjectType() == null ? other.getLikeObjectType() == null : this.getLikeObjectType().equals(other.getLikeObjectType()))
                && (this.getLikeTime() == null ? other.getLikeTime() == null : this.getLikeTime().equals(other.getLikeTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLikeId() == null) ? 0 : getLikeId().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getLikeObjectNo() == null) ? 0 : getLikeObjectNo().hashCode());
        result = prime * result + ((getLikeObjectType() == null) ? 0 : getLikeObjectType().hashCode());
        result = prime * result + ((getLikeTime() == null) ? 0 : getLikeTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", likeId=").append(likeId);
        sb.append(", userNo=").append(userNo);
        sb.append(", likeObjectNo=").append(likeObjectNo);
        sb.append(", likeObjectType=").append(likeObjectType);
        sb.append(", likeTime=").append(likeTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}